<template>
  <el-container style="height: 100vh">
    <el-header>
      <el-menu :default-active="$route.path" mode="horizontal" @select="onMenuSelect">
        <el-menu-item index="/test">MBTI测试</el-menu-item>
        <el-menu-item index="/result">我的结果</el-menu-item>
        <el-menu-item index="/students">学生管理</el-menu-item>
        <el-menu-item index="/stats">班级统计</el-menu-item>
      </el-menu>
    </el-header>
    <el-main>
      <router-view />
    </el-main>
  </el-container>
</template>

<script>
export default {
  methods: {
    onMenuSelect(index) {
      this.$router.push(index);
    }
  }
};
</script>

<style>
body {
  margin: 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}
</style>
